package handlers

import (
	"github.com/yjp211/web"

	"mutu/misc/log"
	"mutu/misc/typedef"
)

type UMangerHandler struct {
}

func (p UMangerHandler) Index(ctx *web.Context) string {
	log.Log.Debug("Hello")
	ctx.Params["sesssiondId"] = "a"
	data := typedef.Dict{"a": 1}

	return JsonpReturn(ctx, data, nil)
}

func (p UMangerHandler) Hello(ctx *web.Context) string {
	ctx.SetHeader("Access-Control-Allow-Origin", "*", false)
	log.Log.Debug("Upload")
	data := typedef.Dict{"Upload": 1}

	return JsonpReturn(ctx, data, nil)
}

func (p UMangerHandler) Create(ctx *web.Context) string {

	log.Log.Debug("helllllll")
	data := typedef.Dict{"a": 1}

	return JsonpReturn(ctx, data, nil)
}

var UserHandler = UMangerHandler{}
